var express = require('express');
var router = express.Router();
var passport=require('passport');
var orderController = require('../controllers/orderController')

// passport.authenticate('jwt',{session:false}),
//获取用户的所有订单信息
router.get('/orderDedail',function(req,res,next){
  orderController.getOrderDetail(req,res)
})

//删除订单
router.delete('/delOrder',function(req,res,next){
  orderController.delOrder(req,res)

})
//增加订单
router.post('/addOrder/:uId',function(req,res,next){
   orderController.addOrder(req,res)
})
/* GET orders listing. */
router.get('/getOrders/:orderId', function(req, res, next) {
  orderController.getOrderList(req,res)
  });
  //立即购买


module.exports=router